package br.edu.unifei.mestrado.unfold;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MainUnfoldMemory {

	private static Logger logger = LoggerFactory.getLogger(MainUnfoldMemory.class);

	public static void main(String[] args) {

		//http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html
		
		if (args.length < 2) {
			logger.warn("Uso: main numberOfSets fileName.txt");
			System.exit(2);
		}
		int numberOfSets = Integer.parseInt(args[0]);
		String file = args[1];

		logger.warn("Iniciando Unfold em memória... file: " + file);

		long delta = System.currentTimeMillis();
		UnfoldMemory unfold = new UnfoldMemory(file);
		unfold.execute(numberOfSets);
		delta = System.currentTimeMillis() - delta;
		logger.warn("Tempo gasto no Unfold em memória: " + delta + " ms");
	}

}
